<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            perspective: 400px;
        }
        .box {
            position: relative;
            width: 200px;
            height: 200px;
            margin: 100px auto;
            /* 过渡的属性 */
            transition: all 2s;
            /* 让其子元素开启3D呈现效果 */
            transform-style: preserve-3d;
        }
        .box div {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            color:#fff;
            font-size: 20px;
            font-weight: 700;
            text-align: center;
            line-height: 200px;
        }
        .box div:first-child {
            background-color: pink;
            z-index: 1;
        }
        .box div:last-child {
            background-color: purple;
            transform: rotateY(180deg);
        }
        /* 让父元素进行沿着Y轴旋转 */
        .box:hover {
            transform: rotateY(180deg);
        }
    </style>
</head>
<body>
    <div class="box">
        <div>前端55期</div>
        <div>黑马程序员</div>
    </div>
</body>
</html>